package org.dromara;

import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.web.core.BaseController;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 测试单表Controller
 *
 * @author Lion Li
 * @date 2021-07-26
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/biz/test")
public class TestTestController extends BaseController {

    /**
     * 匿名访问，在 application.yml中配置了/biz/test/** 不被拦截
     */
    @GetMapping("/test")
    public R<Object> test() {
        Map<String, Object> map = new HashMap<>();
        map.put("mapkey", "mapvalue");
        return R.ok(map);
    }

}
